package com.tecode;

import com.tecode.bean.Person;
import com.tecode.config.ManConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

    public static void main(String[] args) {
            //使用AnnotationConfigApplicationContext 的构造器 来获得IOC容器。
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ManConfig.class);

       // Person person = (Person)context.getBean("person");
       // System.out.println(person.getId());
        //System.out.println(c);

        String[] names = context.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }

    }
}
